int countSymmetricIntegers(int low, int high)
{
    char str[100];
    int cnt = 0;
    for (int i = low; i <= high; i++)
    {
        sprintf(str, "%d", i);
        int size = strlen(str);
        if (size % 2 != 0)
            continue;
        int c1, c2;
        c1 = c2 = 0;
        for (int j = 0; j < size / 2; j++)
            c1 += str[j] - '0';
        for (int j = size / 2; j < size; j++)
            c2 += str[j] - '0';
        if (c1 == c2)
            cnt++;
    }
    return cnt;
}